package org.example.service;

import com.baomidou.mybatisplus.extension.api.R;
import org.example.entity.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * @author TonySong
 * @date 2024/6/27 0027
 * @time 16:53
 */
@FeignClient(value = "user-model-8082",path = "user")
public interface UserFeignService {

    @GetMapping("/users")
    public R getUsers();

    @PostMapping("/")
    public R addUser(@RequestBody User user);
    @DeleteMapping("/{id}")
    public R deleteUser(@PathVariable("id") Integer id);


    @PutMapping("/")
    public R updateUser(@RequestBody User user) ;



    @GetMapping("/{id}")
    public R getUser(@PathVariable("id") Integer id) ;
}
